<template>
  <div>
    <template v-if="!isFullPage">
      <TopNav />
      <CategoryNav />
      <!-- 添加占位元素，高度为两个导航栏的总高度 -->
      <div class="h-32"></div>
    </template>
    <router-view />
  </div>
</template>

<script>
import CategoryNav from "@/components/CategoryNav.vue";
import TopNav from "@/components/TopNav.vue";

export default {
  name: "App",
  components: { TopNav, CategoryNav },
  computed: {
    isFullPage() {
      // 定义不需要显示导航栏的路由路径
      const fullPageRoutes = ['/login', '/register', '/reset-password'];
      return fullPageRoutes.includes(this.$route.path);
    }
  }
};
</script>
